import { createRouter, createWebHashHistory } from "vue-router";
import LayoutView from "@/views/LayoutView.vue";
import HomePageView from "@/views/HomePage.vue";
import PetManageView from "@/views/manages/PetManage.vue";
import GrowthAnalysisView from "@/views/data/GrowthAnalysis.vue";
import GameAnalysisView from "@/views/data/GameAnalysis.vue";
import SystemManageMentView from "@/views/system/SystemManagement.vue";
import UserManagementView from "@/views/system/UserManagement.vue";
import PropertyManageView from "@/views/manages/PropertyManage.vue";
import BossManageView from "@/views/manages/BossManage.vue";
import OutfitManageView from "@/views/manages/OutfitManage.vue";
import RefreshPointView from "@/views/manages/RefreshPoint.vue";
import PlayerManageView from "@/views/operate/PlayerMange.vue";
import LoginView from "@/views/LoginView.vue";
const routes = [
  {
    path: "/login",
    component: LoginView,
    meta: {
      title: "登录页面",
    },
  },
  {
    path: "/",
    name: "登录页面",
    //重定向
    redirect: "/login",
    component: LayoutView,
    children: [
      { path: "/homePage", component: HomePageView },
      {
        path: "/manage/petManage",
        component: PetManageView,
        meta: { title: "宠物管理", icon: "el-icon-s-custom" },
      },
      {
        path: "/manage/propertyManage",
        component: PropertyManageView,
      },
      {
        path: "/manage/outfitManage",
        component: OutfitManageView,
      },
      { path: "/manage/bossManage", component: BossManageView },
      { path: "/manage/refreshPoint", component: RefreshPointView },
      { path: "/operate/playerManage", component: PlayerManageView },
      {
        path: "/data/growthAnalysis",
        component: GrowthAnalysisView,
      },
      {
        path: "/data/gameAnalysis",
        component: GameAnalysisView,
      },
      {
        path: "/system/systemManagement",
        component: SystemManageMentView,
      },
      {
        path: "/system/userManagement",
        component: UserManagementView,
      },
    ],
  },
];

// 创建路由器
const router = createRouter({
  history: createWebHashHistory(),
  routes,
});

export default router;
